package studio.raptor.dispatcher.server.handler;

import studio.raptor.dispatcher.server.context.HandlerContext;

/**
 * 分发器消息处理处理接口
 *
 * @author jack
 * @since 1.0
 */
public abstract class Handler {


  protected Handler successor;

  /**
   * 对事件进行处理
   * @param context 事件处理上下文
   */
  public abstract boolean process(HandlerContext context);


  public Handler getSuccessor() {
    return successor;
  }

  public void setSuccessor(Handler successor) {
    this.successor = successor;
  }

}
